package com.test.gwt.mvp.client.activity;

import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;
import com.test.gwt.mvp.client.factory.ClientFactory;
import com.test.gwt.mvp.client.places.MailDetailPlace;

public class MailDetailActivityMapper implements ActivityMapper{
	ClientFactory clientFactory = null;

	public MailDetailActivityMapper(ClientFactory clientFactory) {
		this.clientFactory = clientFactory;
	}

	public Activity getActivity(Place place) {
		if (place instanceof MailDetailPlace) {
			return new MailDetailActivity((MailDetailPlace) place,
					clientFactory);
		}
		return null;
	}
}
